package com.skillworld.webapp.model.department;

import java.sql.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

@Entity
@Table(name="DepartmentRanking")
public class DepartamentRanking
{
	  private Long idRankingD;
	  private Date date;
	  private Department department1; 
	  private Department department2; 
	  private Department department3; 
	  private Department department4; 
	  private Department department5;
	  
	  public DepartamentRanking()
	  {}


	@SequenceGenerator(name = "DepartamentRankingIdGenerator", sequenceName = "DepartamentRankingSeq")
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO, generator = "DepartamentRankingIdGenerator")
	@Column(name = "idRankingD")
	public long getIdRankingD() {
		return idRankingD;
	}

	public void setIdRankingD(long idRankingD) {
		this.idRankingD = idRankingD;
	}

	@Column(name = "date")
	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}
	
	@Column(name = "idDepartment1")
	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "idDepartment")
	public Department getDepartment1() {
		return department1;
	}

	public void setDepartment1(Department department1) {
		this.department1 = department1;
	}

	@Column(name = "idDepartment2")
	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "idDepartment")
	public Department getDepartment2() {
		return department2;
	}

	public void setDepartment2(Department department2) {
		this.department2 = department2;
	}

	@Column(name = "idDepartment3")
	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "idDepartment")
	public Department getDepartment3() {
		return department3;
	}

	public void setDepartment3(Department department3) {
		this.department3 = department3;
	}

	@Column(name = "idDepartment4")
	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "idDepartment")
	public Department getDepartment4() {
		return department4;
	}

	public void setDepartment4(Department department4) {
		this.department4 = department4;
	}

	@Column(name = "idDepartment5")
	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "idDepartment")
	public Department getDepartment5() {
		return department5;
	}

	public void setDepartment5(Department department5) {
		this.department5 = department5;
	}
}
